// ==========================================================================
// GFast自动生成dao操作代码。
// 生成日期：2023-11-08 10:11:31
// 生成路径: internal/app/plugin/mail/dao/plugin_mail.go
// 生成人：gfast
// desc:邮件发送
// company:云南奇讯科技有限公司
// ==========================================================================

package dao

import (
	"context"
	"github.com/tiger1103/gfast/v3/internal/app/plugins/mail/dao/internal"
	"github.com/tiger1103/gfast/v3/internal/app/plugins/mail/model"
)

// mailDao is the manager for logic model data accessing and custom defined data operations functions management.
// You can define custom methods on it to extend its functionality as you wish.
type mailDao struct {
	*internal.PluginMailDao
}

var (
	// PluginMail is globally public accessible object for table tools_gen_table operations.
	PluginMail = mailDao{
		internal.NewPluginMailDao(),
	}
)

// Fill with you ideas below.
func (p *mailDao) ValidAll() (doorkeepers []*model.PluginMailInfoRes, err error) {
	err = PluginMail.Ctx(context.TODO()).Where(PluginMail.Columns().Status, 1).Scan(&doorkeepers)
	return
}
